package com.cpic.rxjava;

public class ObservableSubscribeOn<T> extends Obsersable<T> {
    Obsersable<T> source;
    int threadFlag=0;//

    public ObservableSubscribeOn(Obsersable<T> source, int threadFlag) {
        this.source = source;
        this.threadFlag = threadFlag;
    }

    @Override
    public void subcribeObserverActual(Observer<T> observer) {
        SchedulerService.INSTANCE.run(new Runnable() {
            @Override
            public void run() {
                source.subcribeObserver(observer);
            }
        },threadFlag);

    }

}
